<template>
    <div>
        <span>我是BaseB组件</span>
        <h3>{{ messageB }}</h3>
        <button @click="clickSend">修改message</button>
    </div>
</template>
<script>
import Bus from "../utils/EventBus";
export default {
    name: "BaseB",
    data() {
        return {
            messageB: "世界",
        };
    },
    methods: {
        clickSend() {
            Bus.emit("changeMsg",this.messageB);
        },
    },
};
</script>
<style scoped>
div {
  border: 1px solid #da1010;
  color: rgb(230, 20, 156);
}
</style>